import { axios } from '@/utils/request'
import api from '../manage'
/**
 * 直播
 * */
// 列表查询
export function livequery (courseParam) {
  return axios({
    url: '/live/query',
    method: 'post',
    data: courseParam
  })
}
// 上下架
export function liveupdateForType (courseParam) {
  return axios({
    url: '/live/updateForType',
    method: 'post',
    data: courseParam
  })
}

// 列表新增
export function liveInsert (model) {
  return axios({
    url: '/live/insert',
    method: 'post',
    data: model
  })
}
// 列表编辑
export function liveup (model) {
  return axios({
    url: '/live/up',
    method: 'post',
    data: model
  })
}
// 列表删除 delete
export function liveDelete (id) {
  return axios({
    url: '/live/delete/' + id,
    method: 'post'
  })
}

// 上传文件
export function uploadVideo (file) {
  return axios({
    url: '/live/uploadVideo',
    method: 'post',
    data: file,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
// 文件删除 delete
export function livedelFile (id) {
  return axios({
    url: '/live/delFile/' + id,
    method: 'post'
  })
}
// 指定观看人群
export function querySpecifyPerson (id) {
  return axios({
    url: '/live/querySpecifyPerson/' + id,
    method: 'post'
  })
}
// 查询部门树状结构
export function querysysDept () {
  return axios({
    url: '/sysDept/query',
    method: 'get'
  })
}